package com.tiny.work.pattern.strategy;

import org.junit.Test;

public class StrategyPattern {

    @Test
    public void test() {
        StrategyContext context = new StrategyContext(new AddStrategy());
        int result = context.executeStrategy(1,2);
        System.out.println(result);

        context = new StrategyContext(new MultiStrategy());
        result = context.executeStrategy(1,2);
        System.out.println(result);

    }
}
